#pragma once

#include "../umlmodel_global.h"

#include "NamedElement.h"
#include "ParameterableElement.h"
#include "VisibilityKind.h"

namespace uml {

/// <summary>
/// PackageableElement
/// A PackageableElement is a NamedElement that may be owned directly by a Package.
/// A PackageableElement is also able to serve as the parameteredElement of a
/// TemplateParameter.
/// </summary>
class UMLMODEL_EXPORT PackageableElement : public ParameterableElement, public NamedElement {

public: // Constructors and destructors
    explicit PackageableElement(const QString& umlType="uml::PackageableElement");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// visibility getter
    /// A PackageableElement must have a visibility specified if it is owned by a
    /// Namespace. The default visibility is public.
    /// </summary>
    VisibilityKind visibility() const;

    /// <summary>
    /// visibility setter
    /// A PackageableElement must have a visibility specified if it is owned by a
    /// Namespace. The default visibility is public.
    /// </summary>
    void setVisibility(VisibilityKind value);

private: // Fields
    /// <summary>
    /// visibility
    /// A PackageableElement must have a visibility specified if it is owned by a
    /// Namespace. The default visibility is public.
    /// </summary>
    VisibilityKind visibility_ = VisibilityKind::kpublic;

};

} // namespace uml
